//
//  IKEcgReportController.m
//  Ikinloop-demo
//
//  Created by Li Shen on 2021/4/25.
//  Copyright © 2021 lyh. All rights reserved.
//

#import "IKEcgReportController.h"
#import "EcgReportViewController.h"
#import "EcgImageViewController.h"


@implementation IKEcgReportController
static IKEcgReportController *report;

+ (instancetype)getInstance{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        report = [[IKEcgReportController alloc] init];
    });
    return report;
}

- (void)showEcgReport:(UIViewController*)controller ecgSmartResult:(NSString*)ecgSmartResult tarFilePath:(NSString*)tarFilePath{
    EcgReportViewController *reportVc = [[EcgReportViewController alloc] init];
    reportVc.ecgSmartResult = ecgSmartResult;
    reportVc.tarFilePath = tarFilePath;
    if(controller.navigationController != nil){
        [controller.navigationController pushViewController:reportVc animated:YES];
    }
}

- (void)showEcgImage:(UIViewController*)controller ecgSmartResult:(NSString*)ecgSmartResult tarFilePath:(NSString*)tarFilePath{
    EcgImageViewController *ecgImageVc = [[EcgImageViewController alloc] init];
    ecgImageVc.ecgSmartResult = ecgSmartResult;
    ecgImageVc.tarFilePath = tarFilePath;
    if(controller.navigationController != nil){
        [controller.navigationController pushViewController:ecgImageVc animated:YES];
    }
}

@end
